﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="EditProfile.aspx.cs" Inherits="BlackEagleClient.EditProfile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="edit">
    
    First Name: <asp:TextBox ID="tbxFNamn" runat="server" Text=""> </asp:TextBox> 
                <asp:RegularExpressionValidator id="rev2" runat="server"
     SetFocusOnError="True"
     ErrorMessage="Maximum length of name is 50 characters"
     Display="Dynamic"
     ControlToValidate="tbxFNamn"
     CssClass="failureNotification"
     ValidationGroup="editValidationGroup"
     ValidationExpression="^[a-zA-Z0-9]{1,50}$">
</asp:RegularExpressionValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
 ControlToValidate="tbxFNamn" 
 CssClass="failureNotification"
 Display="Dynamic"
 ErrorMessage="First Name cannot be emtpy"
 ValidationGroup="editValidationGroup"
  SetFocusOnError="True"></asp:RequiredFieldValidator>
 
           <br />
    Last Name: <asp:TextBox ID="tbxENamn" runat="server" ></asp:TextBox> 
    <asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server"
     SetFocusOnError="True"
     ErrorMessage="Maximum length of name is 50 characters"
     Display="Dynamic"
     ControlToValidate="tbxENamn"
     CssClass="failureNotification"
     ValidationGroup="editValidationGroup"
     ValidationExpression="^[a-zA-Z0-9]{1,50}$">
</asp:RegularExpressionValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
 ControlToValidate="tbxENamn" 
 CssClass="failureNotification"
 Display="Dynamic"
 ErrorMessage="Last Name cannot be emtpy"
 ValidationGroup="editValidationGroup"
  SetFocusOnError="True"></asp:RequiredFieldValidator>

           <br />
    Email: <asp:TextBox ID="tbxEmail" runat="server" ></asp:TextBox>
    <asp:RegularExpressionValidator ID="validateEmail"    
  runat="server" ErrorMessage="Invalid email format"
  ControlToValidate="tbxEmail" 
  CssClass="failureNotification"
  ValidationGroup="editValidationGroup"
  ValidationExpression="^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$" />
  <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
 ControlToValidate="tbxEmail" 
 CssClass="failureNotification"
 Display="Dynamic"
 ErrorMessage="Email cannot be emtpy"
 ValidationGroup="editValidationGroup"
  SetFocusOnError="True"></asp:RequiredFieldValidator>

            <br />
    Birthdate: <asp:TextBox ID="tbxBirthdate" runat="server" ></asp:TextBox> 
    <asp:CompareValidator
    id="dateValidator" runat="server" 
    Type="Date"
    Operator="DataTypeCheck"
    ControlToValidate="tbxBirthdate" 
    CssClass="failureNotification"
    ValidationGroup="editValidationGroup"
    ErrorMessage="Please enter a valid date">
</asp:CompareValidator>
           <br />
           Profile img url: <asp:TextBox ID="tbxImgUrl" runat="server" ></asp:TextBox> 
           <asp:RegularExpressionValidator id="RegularExpressionValidator2" runat="server"
     SetFocusOnError="True"
     ErrorMessage="Maximum length of URL is 255 characters"
     Display="Dynamic"
     ControlToValidate="tbxImgUrl"
     CssClass="failureNotification"
     ValidationGroup="editValidationGroup"
     ValidationExpression="^{1,255}$">
</asp:RegularExpressionValidator>
           <br />
           <br /><br />
                            Personal Description:<br />
    <asp:TextBox ID="tbxDescription" runat="server" Height="100px" TextMode="MultiLine" 
            Width="300px"></asp:TextBox>
            <asp:RegularExpressionValidator id="RegularExpressionValidator3" runat="server"
     SetFocusOnError="True"
     ErrorMessage="Maximum length of personal description is 2000 characters"
     Display="Dynamic"
     ControlToValidate="tbxDescription"
     CssClass="failureNotification"
     ValidationGroup="editValidationGroup"
     ValidationExpression="^{1,2000}$">
</asp:RegularExpressionValidator>
            <br />
    <asp:Button ID="btnEdit" runat="server" Text="Edit Info" OnClick="btnEdit_Click" ValidationGroup="editValidationGroup" />

    
 </div>    
</asp:Content>
